package com.example.rabc.dao;

import com.example.rabc.entity.Permission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;
/**
 * 权限数据访问接口
 */
@Repository
public interface PermissionRepository extends JpaRepository<Permission, Long> {
    Optional<Permission> findByPermissionCode(String permissionCode);
    List<Permission> findByResourceType(String resourceType);
    List<Permission> findByParentId(Long parentId);
    List<Permission> findByStatus(Integer status);
}